<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>单行注释来解释代码</title>
</head>

<body>
    <h1 id="myH1"></h1>
    <p id="myP"></p>
    <script>
        //输出标题:
        document.getElementById("myH1").innerHTML = "code";
        //输出段落;
        document.getElementById("myP").innerHTML = "wang";
    </script>
    <p><b>注释：</b>注释不会被执行。</p>
</body>
</html>